import pandas as pd

graph_name = "Yelp"

nodes_file = f"./{graph_name}/{graph_name}_nodes.csv"

embeddings_file = f"./{graph_name}/{graph_name}_Ours_embeddings.csv"
# embeddings_file = f"./{graph_name}/{graph_name}_Lap_embeddings.csv"
# embeddings_file = f"./{graph_name}/{graph_name}_GCN_embeddings.csv"
# embeddings_file = f"./{graph_name}/{graph_name}_DeepWalk_embeddings.csv"

output_file = f"./{graph_name}/{graph_name}_Ours_nodes_with_embeddings.csv"
# output_file = f"./{graph_name}/{graph_name}_Lap_nodes_with_embeddings.csv"
# output_file = f"./{graph_name}/{graph_name}_GCN_nodes_with_embeddings.csv"
# output_file = f"./{graph_name}/{graph_name}_DeepWalk_nodes_with_embeddings.csv"

nodes_df = pd.read_csv(nodes_file)
embeddings_df = pd.read_csv(embeddings_file)


merged_df = pd.merge(nodes_df, embeddings_df, on="id:ID", how="left")
merged_df.to_csv(output_file, index=False)

# print(f"{graph_name}_nodes_with_embeddings.csv生成完成!!!")
# print(f"{graph_name}_Lap_nodes_with_embeddings.csv生成完成!!!")
print(f"{graph_name}_GCN_nodes_with_embeddings.csv生成完成!!!")
# print(f"{graph_name}_DeepWalk_nodes_with_embeddings.csv生成完成!!!")
